/*
 * service_lightdot_storage.h
 *
 *  Created on: 11/03/2010
 *      Author: gustavo
 */

#ifndef SERVICE_LIGHTDOT_STORAGE_H_
#define SERVICE_LIGHTDOT_STORAGE_H_


// *********************** DEFINITIONS *************************

typedef U32 service_lightdot_storage_RouteHandle;
typedef U32 service_lightdot_storage_BitmapHandle;
typedef U16 service_lightdot_storage_BitmapCollumn;

typedef enum{
	service_lightdot_storage_SHOW_FIXED_MODE,
	service_lightdot_storage_SHOW_SIMPLE_ROLL,
	service_lightdot_storage_SHOW_PAGED_ROLL,
	service_lightdot_storage_SHOW_ROLAGEM_CIRCULAR
} service_lightdot_storage_BitmapShowMode;

typedef enum {
	ROUTE__ONLY,
	MESSAGE_ONLY,
	EXCHANGE_W_SALUTATION,
	EXCHANGE_W_DATE_TIME,
	EXCHANGE_W_DEPARTURE,
	EXCHANGE_W_MESSAGE,
	NUMBER_ONLY,
	EXCHANGE_W_MSG_AND_SALUTATION,
	EXCHANGE_W_MSG_AND_DEPARTURE,
	EXCHANGE_W_MSG_AND_DATE_TIME,
} service_lightdot_storage_PanelService;

// *********************** PROTOTYPES **************************

extern void service_lightdot_storage_init(void);
extern service_lightdot_storage_RouteHandle service_lightdot_storage_getRoute(U16 routeIndex);
extern service_lightdot_storage_BitmapHandle service_lightdot_storage_getRouteNumberBitmap(service_lightdot_storage_RouteHandle routeHandle);
extern service_lightdot_storage_BitmapHandle service_lightdot_storage_getRouteGoingBitmap(service_lightdot_storage_RouteHandle routeHandle);
extern service_lightdot_storage_BitmapHandle service_lightdot_storage_getRouteRoundBitmap(service_lightdot_storage_RouteHandle routeHandle);
extern U8 service_lightdot_storage_getBitmapSize(service_lightdot_storage_BitmapHandle bitmapHandle);
extern service_lightdot_storage_BitmapShowMode service_lightdot_storage_getBitmapShowMode(service_lightdot_storage_BitmapHandle bitmapHandle);
extern service_lightdot_storage_BitmapCollumn service_lightdot_storage_readBitmapCollumn(service_lightdot_storage_BitmapHandle bitmapHandle, U8 collumnIndex);
extern BOOL service_lightdot_storage_isLastBitmap(service_lightdot_storage_BitmapHandle bitmapHandle);
extern service_lightdot_storage_BitmapHandle service_lightdot_storage_getNextBitmap(service_lightdot_storage_BitmapHandle bitmapHandle);
extern service_lightdot_storage_PanelService service_lightdot_storage_getPanelService(void);
extern U16 service_lightdot_storage_getCurrentRouteIndex(void);
void service_lightdos_storage_TakeMutex(void);
void service_lightdos_storage_GiveMutex(void);
void service_lightdos_storage_write(U16 page, U16 skip, U8 *byte, U16 size);


#endif /* SERVICE_LIGHTDOT_STORAGE_H_ */
